// class类
console.log('============== class类 ==============')

// 定义类
class User {
    //定义构造器
    constructor(username,password) {
        // 不需要创建属性
        this.username = username;
        this.password = password;
    }

    // 定义方法
    info(){
        console.log(`信息：${this.username},${this.password}`);
    }

    //静态方法
    static info(){
        console.log('this is user class info static function...');
    }
}

// 实例化对象
let user = new User('zs','123');
user.info();
console.log(user.username);
console.log(user.password);
User.info();